package org.example.Config;

import lombok.Data;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.stereotype.Component;

/**
 * @Author : zhangbo
 * @data : 2024/7/27
 * @description :
 */
//1.定义数据模型封装yml文件对应的数据
//2.定义为spring的bean交给spring管理  @Component
//3.指定加载的数据  @ConfigurationProperties
@Data
@Component
@ConfigurationProperties(prefix = "datasource")
public class MysqlDatasource {
    private String driver;
    private String url;
    private String username;
    private String password;
}
